package com.cmy;

public class Pets {
    private String name;    //宠物名字
    private String type;    //宠物类别
    private String sex;     //宠物性别
    private Integer healthy; //宠物健康值

    public Pets() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getHealthy() {
        return healthy;
    }

    public void setHealthy(Integer healthy) {
        if(healthy>60){
            this.healthy = healthy;
        }else {
            this.healthy=60;
        }

    }

    @Override
    public String toString() {
        return "Pets{" +
                "name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", sex='" + sex + '\'' +
                ", healthy=" + healthy +
                '}';
    }
}
